<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <title>LayUI&Thymeleaf 初始模板</title>
    <link th:href="@{/layui/css/layui.css}" rel="stylesheet"/>

</head>
<body>

<!--头部-->
<div class="layui-header" th:fragment="navbar">
    <div class="layui-logo">奶茶店后台管理系统</div>
    <!-- 头部区域（可配合layui已有的水平导航） -->
    <ul class="layui-nav layui-layout-left">
        <li class="layui-nav-item"><a href="/pickup/all">自取订单</a></li>
        <li class="layui-nav-item"><a href="/delivery/all">外卖订单</a></li>
        <li class="layui-nav-item"><a href="/manage/all">商品管理</a></li>
<!--        <li class="layui-nav-item"><a href="">个人信息</a></li>-->
<!--        <li class="layui-nav-item"><a href="javascript:;">其它功能</a>-->
<!--            <dl class="layui-nav-child">-->
<!--                <dd>-->
<!--                    <a href="">本日流水统计</a>-->
<!--                </dd>-->
<!--                <dd>-->
<!--                    <a href="">本周流水统计</a>-->
<!--                </dd>-->
<!--                <dd>-->
<!--                    <a href="">本月流水统计</a>-->
<!--                </dd>-->
<!--            </dl>-->
<!--        </li>-->
    </ul>
    <ul class="layui-nav layui-layout-right">
        <li class="layui-nav-item"><a href="javascript:;" th:text="${session.username}">  </a>
            <dl class="layui-nav-child">
                <dd>
                    <a th:href="@{/seller/update}">基本资料</a>
                </dd>
            </dl>
        </li>
        <li class="layui-nav-item"><a th:href="@{/seller/logout}">登出</a></li>
    </ul>
</div>

<!--pick的导航栏-->
<div class="layui-side layui-bg-black" th:fragment="siderbarpickup">
    <div class="layui-side-scroll">
        <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
        <ul class="layui-nav layui-nav-tree" lay-filter="test">
            <li class="layui-nav-item layui-nav-itemed"><a class=""
                                                           href="/pickup/unfinished">未完成订单</a>
<!--                <dl class="layui-nav-child">-->
<!--                    <dd>-->
<!--                        <a href="javascript:;">奶茶</a>-->
<!--                    </dd>-->
<!--                    <dd>-->
<!--                        <a href="javascript:;">咖啡</a>-->
<!--                    </dd>-->
<!--                </dl>-->
            </li>
            <li class="layui-nav-item"><a href="/pickup/finished">已完成订单</a>
<!--                <dl class="layui-nav-child">-->
<!--                    <dd>-->
<!--                        <a href="javascript:;">奶茶</a>-->
<!--                    </dd>-->
<!--                    <dd>-->
<!--                        <a href="javascript:;">咖啡</a>-->
<!--                    </dd>-->
<!--                </dl>-->
            </li>
        </ul>
    </div>
</div>

<!--delivery的导航栏-->
<div class="layui-side layui-bg-black" th:fragment="siderbardelivery">
    <div class="layui-side-scroll">
        <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
        <ul class="layui-nav layui-nav-tree" lay-filter="test">
            <li class="layui-nav-item layui-nav-itemed"><a class=""
                                                           href="/delivery/unfinished">未完成订单</a>
<!--                <dl class="layui-nav-child">-->
<!--                    <dd>-->
<!--                        <a href="javascript:;">奶茶</a>-->
<!--                    </dd>-->
<!--                    <dd>-->
<!--                        <a href="javascript:;">咖啡</a>-->
<!--                    </dd>-->
<!--                </dl>-->
            </li>
            <li class="layui-nav-item"><a href="/delivery/finished">已完成订单</a>
<!--                <dl class="layui-nav-child">-->
<!--                    <dd>-->
<!--                        <a href="javascript:;">奶茶</a>-->
<!--                    </dd>-->
<!--                    <dd>-->
<!--                        <a href="javascript:;">咖啡</a>-->
<!--                    </dd>-->
<!--                </dl>-->
            </li>
        </ul>
    </div>
</div>

<!--产品管理的导航栏-->
<div class="layui-side layui-bg-black" th:fragment="siderbarproductmanage">
    <div class="layui-side-scroll">
        <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
        <ul class="layui-nav layui-nav-tree" lay-filter="test">
            <li class="layui-nav-item layui-nav-itemed"><a class="" href="/manage/coffee">咖啡</a>

            </li>
            <li class="layui-nav-item"><a href="/manage/mtea">奶茶</a>

            </li>
            <li class="layui-nav-item"><a href="/manage/newproduct">新增</a>

            </li>
        </ul>
    </div>
</div>

<!--什么都没有的导航栏-->
<div class="layui-side layui-bg-black" th:fragment="siderbarnone">
    <div class="layui-side-scroll">
        <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
        <ul class="layui-nav layui-nav-tree" lay-filter="test">

        </ul>
    </div>
</div>

<!--页面底部-->
<div class="layui-footer" th:fragment="bottombar">
    <!-- 底部固定区域 -->
    © zh1n1an.github.io
</div>

<!--//产品弹出层-->
<div th:fragment="layerGetListInfo">
    <script>
        layui.use(['layer','jquery'],function (){
            var $ = layui.jquery;
            $(".lookinfo").click(function (){
                var getid = $(this).attr("getid")
                var getProductList = $(this).attr("getProductList")

                layer.open({
                    type: 2,
                    content: '/manage/getList?id='+getid //这里content是一个URL，如果你不想让iframe出现滚动条，你还可以content: ['http://sentsin.com', 'no']
                });

            });
        })
    </script>
</div>

<!--//评价弹出层-->

<div th:fragment="layerGetListInfo">
    <script>
        layui.use(['layer','jquery'],function (){
            var $ = layui.jquery;
            $(".lookreview").click(function (){
                var getid = $(this).attr("getid")
                var getProductList = $(this).attr("getProductList")

                layer.open({
                    type: 2,
                    content: '/manage/getReview?id='+getid //这里content是一个URL，如果你不想让iframe出现滚动条，你还可以content: ['http://sentsin.com', 'no']
                });

            });
        })
    </script>
</div>

<!--//自取所有产品的Table-->
<div th:fragment="ListsAllTable">
    <table class="layui-table">
        <thead>
        <tr>
            <td>订单ID</td>
            <td>下单时间</td>
            <td>用户</td>
            <td>打包</td>
            <td>备注</td>
            <td>所点产品</td>
            <td>总价</td>
            <td>操作</td>
        </tr>
        </thead>
        <tbody>
        <tr th:each="one:${AllData}">
            <td th:text="${one.getId()}"></td>
            <td th:text="${one.getStarttime()}"></td>
            <td th:text="${one.getCustomerId()}"></td>
            <td th:text="${one.getPacked()}"></td>
            <td th:text="${one.getRemark()}"></td>
            <td >
                <!--                        <text th:each="product:${one.getOrderedProductList()}">-->
                <!--                            <textPath th:text="${product}"></textPath>-->
                <!--                            <br>-->
                <!--                        </text>-->

                <button class="layui-btn layui-btn-radius layui-btn-normal lookinfo" th:getid="${one.getId()}">
                    <i class="layui-icon">&#xe649;</i>
                    查看
                </button>
            </td>
            <td th:text="${one.getTotalPrice()}"></td>
            <td th:if="${one.getFinishtime() == null}">
                <a class="layui-btn layui-btn-radius layui-btn-normal" th:href="@{/pickup/finish(id=${one.getId()})}">
                    <i class="layui-icon">&#xe605;</i>
                    完成
                </a>
            </td>
            <td th:if="!${one.getFinishtime() == null}">
                <a class="layui-btn layui-btn-radius layui-btn-normal layui-btn-disabled">
                    <i class="layui-icon">&#xe605;</i>
                    已完成
                </a>

            </td>

        </tr>
        </tbody>
    </table>
</div>

<!--//自取未完成产品Table-->
<div th:fragment="ListUnfTable">
    <table class="layui-table">
        <thead>
        <tr>
            <td>订单ID</td>
            <td>下单时间</td>
            <td>用户</td>
            <td>打包</td>
            <td>备注</td>
            <td>所点产品</td>
            <td>总价</td>
            <td>操作</td>
        </tr>
        </thead>
        <tbody>
        <tr th:each="one:${AllData}" th:if="${one.getFinishtime() == null}">
            <td th:text="${one.getId()}"></td>
            <td th:text="${one.getStarttime()}"></td>
            <td th:text="${one.getCustomerId()}"></td>
            <td th:text="${one.getPacked()}"></td>
            <td th:text="${one.getRemark()}"></td>
            <td >
                <button class="layui-btn layui-btn-radius layui-btn-normal lookinfo" th:getid="${one.getId()}">
                    <i class="layui-icon">&#xe649;</i>
                    查看
                </button>
            </td>
            <td th:text="${one.getTotalPrice()}"></td>
            <td>
                <a class="layui-btn layui-btn-radius layui-btn-normal" th:href="@{/pickup/finish(id=${one.getId()})}">
                    <i class="layui-icon">&#xe605;</i>
                    完成
                </a>
            </td>


        </tr>
        </tbody>
    </table>

</div>

<!--//自取已完成产品Table-->
<div th:fragment="ListFTable">
    <table class="layui-table">
        <thead>
        <tr>
            <td>订单ID</td>
            <td>下单时间</td>
            <td>用户</td>
            <td>打包</td>
            <td>备注</td>
            <td>所点产品</td>
            <td>总价</td>
            <td>操作</td>
        </tr>
        </thead>
        <tbody>
        <tr th:each="one:${AllData}" th:if="!${one.getFinishtime() == null}">
            <td th:text="${one.getId()}"></td>
            <td th:text="${one.getStarttime()}"></td>
            <td th:text="${one.getCustomerId()}"></td>
            <td th:text="${one.getPacked()}"></td>
            <td th:text="${one.getRemark()}"></td>
            <td >
                <button class="layui-btn layui-btn-radius layui-btn-normal lookinfo" th:getid="${one.getId()}">
                    <i class="layui-icon">&#xe649;</i>
                    查看
                </button>
            </td>
            <td th:text="${one.getTotalPrice()}"></td>
            <td>
                <a class="layui-btn layui-btn-radius layui-btn-normal layui-btn-disabled">
                    <i class="layui-icon">&#xe605;</i>
                    已完成
                </a>
                <a class="layui-btn layui-btn-radius layui-btn-normal lookreview" th:getid="${one.getId()}">
                    <i class="layui-icon">&#xe605;</i>
                    查看评价
                </a>
            </td>

        </tr>
        </tbody>
    </table>
</div>

<!--//外卖自取所有产品的Table-->
<div th:fragment="deliveryListsAllTable">
    <table class="layui-table">
        <thead>
        <tr>
            <td>订单ID</td>
            <td>下单时间</td>
            <td>用户</td>
            <td>打包</td>
            <td>备注</td>
            <td>所点产品</td>
            <td>总价</td>
            <td>操作</td>
        </tr>
        </thead>
        <tbody>
        <tr th:each="one:${AllData}">
            <td th:text="${one.getId()}"></td>
            <td th:text="${one.getStarttime()}"></td>
            <td th:text="${one.getCustomerId()}"></td>
            <td th:text="${one.getPacked()}"></td>
            <td th:text="${one.getRemark()}"></td>
            <td >
                <!--                        <text th:each="product:${one.getOrderedProductList()}">-->
                <!--                            <textPath th:text="${product}"></textPath>-->
                <!--                            <br>-->
                <!--                        </text>-->

                <button class="layui-btn layui-btn-radius layui-btn-normal lookinfo" th:getid="${one.getId()}">
                    <i class="layui-icon">&#xe649;</i>
                    查看
                </button>
            </td>
            <td th:text="${one.getTotalPrice()}"></td>
            <td th:if="${one.getFinishtime() == null}">
                <a class="layui-btn layui-btn-radius layui-btn-normal" th:href="@{/delivery/finish(id=${one.getId()})}">
                    <i class="layui-icon">&#xe605;</i>
                    完成
                </a>
            </td>
            <td th:if="!${one.getFinishtime() == null}">
                <a class="layui-btn layui-btn-radius layui-btn-normal layui-btn-disabled">
                    <i class="layui-icon">&#xe605;</i>
                    已完成
                </a>

            </td>

        </tr>
        </tbody>
    </table>
</div>

<!--//外卖未完成产品Table-->
<div th:fragment="deliveryListUnfTable">
    <table class="layui-table">
        <thead>
        <tr>
            <td>订单ID</td>
            <td>下单时间</td>
            <td>用户</td>
            <td>打包</td>
            <td>备注</td>
            <td>所点产品</td>
            <td>总价</td>
            <td>操作</td>
        </tr>
        </thead>
        <tbody>
        <tr th:each="one:${AllData}" th:if="${one.getFinishtime() == null}">
            <td th:text="${one.getId()}"></td>
            <td th:text="${one.getStarttime()}"></td>
            <td th:text="${one.getCustomerId()}"></td>
            <td th:text="${one.getPacked()}"></td>
            <td th:text="${one.getRemark()}"></td>
            <td >
                <button class="layui-btn layui-btn-radius layui-btn-normal lookinfo" th:getid="${one.getId()}">
                    <i class="layui-icon">&#xe649;</i>
                    查看
                </button>
            </td>
            <td th:text="${one.getTotalPrice()}"></td>
            <td>
                <a class="layui-btn layui-btn-radius layui-btn-normal" th:href="@{/delivery/finish(id=${one.getId()})}">
                    <i class="layui-icon">&#xe605;</i>
                    完成
                </a>
            </td>


        </tr>
        </tbody>
    </table>

</div>

<!--//外卖已完成产品Table-->
<div th:fragment="deliveryListFTable">
    <table class="layui-table">
        <thead>
        <tr>
            <td>订单ID</td>
            <td>下单时间</td>
            <td>用户</td>
            <td>打包</td>
            <td>备注</td>
            <td>所点产品</td>
            <td>总价</td>
            <td>操作</td>
        </tr>
        </thead>
        <tbody>
        <tr th:each="one:${AllData}" th:if="!${one.getFinishtime() == null}">
            <td th:text="${one.getId()}"></td>
            <td th:text="${one.getStarttime()}"></td>
            <td th:text="${one.getCustomerId()}"></td>
            <td th:text="${one.getPacked()}"></td>
            <td th:text="${one.getRemark()}"></td>
            <td >
                <button class="layui-btn layui-btn-radius layui-btn-normal lookinfo" th:getid="${one.getId()}">
                    <i class="layui-icon">&#xe649;</i>
                    查看
                </button>
            </td>
            <td th:text="${one.getTotalPrice()}"></td>
            <td>
                <a class="layui-btn layui-btn-radius layui-btn-normal layui-btn-disabled">
                    <i class="layui-icon">&#xe605;</i>
                    已完成
                </a>
                <a class="layui-btn layui-btn-radius layui-btn-normal lookreview" th:getid="${one.getId()}">
                    <i class="layui-icon">&#xe605;</i>
                    查看评价
                </a>
            </td>

        </tr>
        </tbody>
    </table>
</div>


</body>
</html>